<?php
$link = mysql_connect('localhost', 'root', '');
//$link = mysql_connect('aecabill.accountsupportmysql.com', 'aeca', 'fArC5YyyG8NT9wdC5LXP');
if (!$link) { 
     die('There appeared to be an error while connecting to the website database: ' . mysql_error()); 
}
mysql_select_db(aeca);

$query = "select * from tbl_companies";
$result = mysql_query($query);
?>

<div class="viewListcompany show"> 
<table cellspacing='2' cellpadding='5'>
		<tr style="background-color:#0673C5;">
			<th>Company Id</th>
			<th>Company Name</th>
			<th>Actions</th>
		</tr>
		<? while($cmpy = mysql_fetch_array($result)){?>
		<tr id="cmpy_del<?=$cmpy['c_id'];?>" style="background-color:#E6E9F2;">
			<td><? echo $cmpy['c_id']?></td>
			<td><? echo $cmpy['c_name']?></td>
			<td>
				<span class="ui-icon ui-icon-pencil" title="Edit" onclick="editcmpy(<?=$cmpy['c_id'];?>)" style="float:left;cursor:pointer"></span>
				<!-- <a href="index.php?page=edit-cmpy-profile&Id=<?=$cmpy['c_id'];?>" title="Edit"><div class="ui-icon ui-icon-pencil" style="float:left;"></div></a> -->
				<a href="javascript:void(0)" onclick="opendialog(<?=$cmpy['c_id'];?>,'company')" class="ui-corner-all" title="Delete"><span class="ui-icon ui-icon-trash"></span></a>
			</td>
		</tr>
		<?}?>
	</table>
</div>
<div class="editCmpy"></div>